<?php
namespace Index\Controller;
use Think\Controller;
header("Content-type: text/html; charset=utf-8");
class DynamicController extends Controller {
    public function listAction(){ 
    	$sql="select t1.qid,t1.send_replay_question,t1.time,t2.id,t2.head_img,t2.username,t3.title,t3.replay_num,t4.id as aid,t4.centent,t4.agree,t4.uid from log t1 left join user t2 on t1.uid=t2.id left join question t3 on t1.qid=t3.id left join answer t4 on t1.replay_id=t4.id order by t1.time desc";
    	$data_m=M();
    	$res = $data_m->query($sql);
        // var_dump($res);
        // exit();
    	$this->assign('res',$res);
    	$this->display();
     }
}
?>